Create a new analysis directory...
[1] FALSE
[1] FALSE
[1] FALSE
[1] FALSE
[1] FALSE
[1] "/Users/swvanderlaan/git/CirculatoryHealth/AE_20211201_YAW_SWVANDERLAAN_HDAC9"
[1] "_archived" "1. AE_20211201_YAW_SWVANDERLAAN_HDAC9.nb.html"
[3] "1. AE_20211201_YAW_SWVANDERLAAN_HDAC9.Rmd" "2. SNP_analyses.Rmd"
[5] "20220317.HDAC9.baseline.RData" "3. bulkRNAseq.nb.html"
[7] "3. bulkRNAseq.Rmd" "4. report.scrnaseq.nb.html"
[9] "4. report.scrnaseq.Rmd" "AE_20211201_YAW_SWVANDERLAAN_HDAC9.Rproj"
[11] "AnalysisPlan" "HDAC9"
[13] "images" "LICENSE"
[15] "README.html" "README.md"
[17] "references.bib" "renv"
[19] "renv.lock" "scripts"
[21] "SNP" "targets"
source(paste0(PROJECT_loc, "/scripts/functions.R"))ggplot2::theme_set(ggplot2::theme_minimal())
pander::panderOptions("table.split.table", Inf)install.packages.auto("pander")Loading required package: pander
install.packages.auto("readr")Loading required package: readr
install.packages.auto("optparse")Loading required package: optparse
install.packages.auto("tools")Loading required package: tools
install.packages.auto("dplyr")Loading required package: dplyr
Attaching package: 'dplyr'
The following objects are masked from 'package:stats':
filter, lag
The following objects are masked from 'package:base':
intersect, setdiff, setequal, union
install.packages.auto("tidyr")Loading required package: tidyr
install.packages.auto("naniar")Loading required package: naniar
# To get 'data.table' with 'fwrite' to be able to directly write gzipped-files
# Ref: https://stackoverflow.com/questions/42788401/is-possible-to-use-fwrite-from-data-table-with-gzfile
# install.packages("data.table", repos = "https://Rdatatable.gitlab.io/data.table")
library(data.table)data.table 1.14.2 using 1 threads (see ?getDTthreads). Latest news: r-datatable.com
**********
This installation of data.table has not detected OpenMP support. It should still work but in single-threaded mode.
This is a Mac. Please read https://mac.r-project.org/openmp/. Please engage with Apple and ask them for support. Check r-datatable.com for updates, and our Mac instructions here: https://github.com/Rdatatable/data.table/wiki/Installation. After several years of many reports of installation problems on Mac, it's time to gingerly point out that there have been no similar problems on Windows or Linux.
**********
Attaching package: 'data.table'
The following objects are masked from 'package:dplyr':
between, first, last
install.packages.auto("tidyverse")Loading required package: tidyverse
── Attaching packages ──────────────────────────────────────────────────────────────────── tidyverse 1.3.1 ──
✓ ggplot2 3.3.5 ✓ stringr 1.4.0
✓ tibble 3.1.6 ✓ forcats 0.5.1
✓ purrr 0.3.4
── Conflicts ─────────────────────────────────────────────────────────────────────── tidyverse_conflicts() ──
x data.table::between() masks dplyr::between()
x dplyr::filter() masks stats::filter()
x data.table::first() masks dplyr::first()
x dplyr::lag() masks stats::lag()
x data.table::last() masks dplyr::last()
x purrr::transpose() masks data.table::transpose()
install.packages.auto("knitr")Loading required package: knitr
install.packages.auto("DT")Loading required package: DT
install.packages.auto("eeptools")Loading required package: eeptools
Welcome to eeptools for R version 1.2.0!
Developed by Jared E. Knowles 2012-2018
for the Wisconsin Department of Public Instruction
Distributed without warranty.
install.packages.auto("openxlsx")Loading required package: openxlsx
install.packages.auto("haven")Loading required package: haven
install.packages.auto("tableone")Loading required package: tableone
install.packages.auto("sjPlot")Loading required package: sjPlot
install.packages.auto("BlandAltmanLeh")Loading required package: BlandAltmanLeh
# Install the devtools package from Hadley Wickham
install.packages.auto('devtools')Loading required package: devtools
Loading required package: usethis
# for plotting
install.packages.auto("pheatmap")Loading required package: pheatmap
install.packages.auto("forestplot")Loading required package: forestplot
Loading required package: grid
Loading required package: magrittr
Attaching package: 'magrittr'
The following object is masked from 'package:purrr':
set_names
The following object is masked from 'package:tidyr':
extract
Loading required package: checkmate
install.packages.auto("ggplot2")
install.packages.auto("ggpubr")Loading required package: ggpubr
install.packages.auto("UpSetR")Loading required package: UpSetR
devtools::install_github("thomasp85/patchwork")Using github PAT from envvar GITHUB_PAT
Skipping install of 'patchwork' from a github remote, the SHA1 (79223d30) has not changed since last install.
Use `force = TRUE` to force installation
# for Seurat etc
install.packages.auto("org.Hs.eg.db")Loading required package: org.Hs.eg.db
Loading required package: AnnotationDbi
Loading required package: stats4
Loading required package: BiocGenerics
Attaching package: 'BiocGenerics'
The following objects are masked from 'package:dplyr':
combine, intersect, setdiff, union
The following objects are masked from 'package:stats':
IQR, mad, sd, var, xtabs
The following objects are masked from 'package:base':
anyDuplicated, append, as.data.frame, basename, cbind, colnames, dirname, do.call,
duplicated, eval, evalq, Filter, Find, get, grep, grepl, intersect, is.unsorted, lapply, Map,
mapply, match, mget, order, paste, pmax, pmax.int, pmin, pmin.int, Position, rank, rbind,
Reduce, rownames, sapply, setdiff, sort, table, tapply, union, unique, unsplit, which.max,
which.min
Loading required package: Biobase
Welcome to Bioconductor
Vignettes contain introductory material; view with 'browseVignettes()'. To cite Bioconductor,
see 'citation("Biobase")', and for packages 'citation("pkgname")'.
Attaching package: 'Biobase'
The following object is masked from 'package:checkmate':
anyMissing
Loading required package: IRanges
Loading required package: S4Vectors
Attaching package: 'S4Vectors'
The following objects are masked from 'package:data.table':
first, second
The following object is masked from 'package:tidyr':
expand
The following objects are masked from 'package:dplyr':
first, rename
The following objects are masked from 'package:base':
expand.grid, I, unname
Attaching package: 'IRanges'
The following object is masked from 'package:purrr':
reduce
The following object is masked from 'package:data.table':
shift
The following objects are masked from 'package:dplyr':
collapse, desc, slice
Attaching package: 'AnnotationDbi'
The following object is masked from 'package:dplyr':
select
install.packages.auto("mygene")Loading required package: mygene
Loading required package: GenomicFeatures
Loading required package: GenomeInfoDb
Loading required package: GenomicRanges
install.packages.auto("EnhancedVolcano")Loading required package: EnhancedVolcano
Loading required package: ggrepel
Registered S3 methods overwritten by 'ggalt':
method from
grid.draw.absoluteGrob ggplot2
grobHeight.absoluteGrob ggplot2
grobWidth.absoluteGrob ggplot2
grobX.absoluteGrob ggplot2
grobY.absoluteGrob ggplot2
# Install the devtools package from Hadley Wickham
install.packages.auto('devtools')
# Replace '2.3.4' with your desired version
# devtools::install_version(package = 'Seurat', version = package_version('2.3.4'))
# install.packages("Seurat")
install.packages.auto("Seurat") # latest versionLoading required package: Seurat
Attaching SeuratObject
Attaching package: 'Seurat'
The following object is masked from 'package:DT':
JS
library("Seurat")
Today = format(as.Date(as.POSIXlt(Sys.time())), "%Y%m%d")
Today.Report = format(as.Date(as.POSIXlt(Sys.time())), "%A, %B %d, %Y")
### UtrechtScienceParkColoursScheme
###
### WebsitetoconvertHEXtoRGB:http://hex.colorrrs.com.
### Forsomefunctionsyoushoulddividethesenumbersby255.
###
### No. Color HEX (RGB) CHR MAF/INFO
###---------------------------------------------------------------------------------------
### 1 yellow #FBB820 (251,184,32) => 1 or 1.0>INFO
### 2 gold #F59D10 (245,157,16) => 2
### 3 salmon #E55738 (229,87,56) => 3 or 0.05<MAF<0.2 or 0.4<INFO<0.6
### 4 darkpink #DB003F ((219,0,63) => 4
### 5 lightpink #E35493 (227,84,147) => 5 or 0.8<INFO<1.0
### 6 pink #D5267B (213,38,123) => 6
### 7 hardpink #CC0071 (204,0,113) => 7
### 8 lightpurple #A8448A (168,68,138) => 8
### 9 purple #9A3480 (154,52,128) => 9
### 10 lavendel #8D5B9A (141,91,154) => 10
### 11 bluepurple #705296 (112,82,150) => 11
### 12 purpleblue #686AA9 (104,106,169) => 12
### 13 lightpurpleblue #6173AD (97,115,173/101,120,180) => 13
### 14 seablue #4C81BF (76,129,191) => 14
### 15 skyblue #2F8BC9 (47,139,201) => 15
### 16 azurblue #1290D9 (18,144,217) => 16 or 0.01<MAF<0.05 or 0.2<INFO<0.4
### 17 lightazurblue #1396D8 (19,150,216) => 17
### 18 greenblue #15A6C1 (21,166,193) => 18
### 19 seaweedgreen #5EB17F (94,177,127) => 19
### 20 yellowgreen #86B833 (134,184,51) => 20
### 21 lightmossgreen #C5D220 (197,210,32) => 21
### 22 mossgreen #9FC228 (159,194,40) => 22 or MAF>0.20 or 0.6<INFO<0.8
### 23 lightgreen #78B113 (120,177,19) => 23/X
### 24 green #49A01D (73,160,29) => 24/Y
### 25 grey #595A5C (89,90,92) => 25/XY or MAF<0.01 or 0.0<INFO<0.2
### 26 lightgrey #A2A3A4 (162,163,164) => 26/MT
###
### ADDITIONAL COLORS
### 27 midgrey #D7D8D7
### 28 verylightgrey #ECECEC"
### 29 white #FFFFFF
### 30 black #000000
###----------------------------------------------------------------------------------------------
uithof_color = c("#FBB820","#F59D10","#E55738","#DB003F","#E35493","#D5267B",
"#CC0071","#A8448A","#9A3480","#8D5B9A","#705296","#686AA9",
"#6173AD","#4C81BF","#2F8BC9","#1290D9","#1396D8","#15A6C1",
"#5EB17F","#86B833","#C5D220","#9FC228","#78B113","#49A01D",
"#595A5C","#A2A3A4", "#D7D8D7", "#ECECEC", "#FFFFFF", "#000000")
uithof_color_legend = c("#FBB820", "#F59D10", "#E55738", "#DB003F", "#E35493",
"#D5267B", "#CC0071", "#A8448A", "#9A3480", "#8D5B9A",
"#705296", "#686AA9", "#6173AD", "#4C81BF", "#2F8BC9",
"#1290D9", "#1396D8", "#15A6C1", "#5EB17F", "#86B833",
"#C5D220", "#9FC228", "#78B113", "#49A01D", "#595A5C",
"#A2A3A4", "#D7D8D7", "#ECECEC", "#FFFFFF", "#000000")
### ----------------------------------------------------------------------------For the ERA-CVD ‘druggable-MI-targets’ project (grantnumber: 01KL1802) we performed two related RNA sequencing (RNAseq) experiments:
conventional (‘bulk’) RNAseq using RNA extracted from carotid plaque samples, n ± 700. As of Thursday, March 17, 2022 all samples have been selected and RNA has been extracted; quality control (QC) was performed and we have a dataset of 635 samples.
single-cell RNAseq (scRNAseq) of at least n = 40 samples (20 females, 20 males). As of Thursday, March 17, 2022 data is available of 40 samples (3 females, 15 males), we are extending sampling to get more female samples.
Plaque samples are derived from carotid endarterectomies as part of the Athero-Express Biobank Study which is an ongoing study in the UMC Utrecht.
Here we map the HDAC9 to single-cells from the plaques.
library(openxlsx)
gene_list_df <- read.xlsx(paste0(PROJECT_loc, "/targets/Genes.xlsx"), sheet = "Genes")
target_genes <- unlist(gene_list_df$Gene)
target_genes[1] "HDAC9" "TWIST1" "IL6" "IL1B"
First we will load the data:
Here we load the latest dataset from our Athero-Express single-cell RNA experiment.
# load(paste0(AESCRNA_loc, "/20210811.46.patients.KP.RData"))
# scRNAseqData <- seuset
# rm(seuset)
#
# saveRDS(scRNAseqData, paste0(AESCRNA_loc, "/20210811.46.patients.KP.RDS"))
scRNAseqData <- readRDS(paste0(AESCRNA_loc, "/20210811.46.patients.KP.RDS"))
scRNAseqDataAn object of class Seurat
36147 features across 4948 samples within 2 assays
Active assay: RNA (20111 features, 0 variable features)
1 other assay present: SCT
2 dimensional reductions calculated: pca, umap
The naming/classification is based on a combination conventional markers. We do not claim to know the exact identity of each cell, rather we refer to cells as ‘KIT+ Mast cells”-like cells. Likewise we refer to the cell clusters as ’communities’ of cells that exhibit similar properties, i.e. similar defining markers (e.g. KIT).
We will rename the cell types to human readable names.
### change names for clarity
backup.scRNAseqData = scRNAseqData
# get the old names to change to new names
UMAPPlot(scRNAseqData, label = FALSE, pt.size = 1.25, label.size = 4, group.by = "ident")unique(scRNAseqData@active.ident) [1] CD3+ T Cells I CD3+ T Cells IV
[3] CD34+ Endothelial Cells I CD3+ T Cells V
[5] CD3+CD56+ NK Cells II CD3+ T Cells VI
[7] CD68+IL18+TLR4+TREM2+ Resident macrophages CD3+CD56+ NK Cells I
[9] ACTA2+ Smooth Muscle Cells CD3+ T Cells II
[11] FOXP3+ T Cells CD34+ Endothelial Cells II
[13] CD3+ T Cells III CD68+CD1C+ Dendritic Cells
[15] CD68+CASP1+IL1B+SELL+ Inflammatory macrophages CD79A+ Class-switched Memory B Cells
[17] CD68+ABCA1+OLR1+TREM2+ Foam Cells CD68+KIT+ Mast Cells
[19] CD68+CD4+ Monocytes CD79+ Plasma B Cells
20 Levels: CD3+ T Cells I CD3+ T Cells II CD3+ T Cells III ... CD79+ Plasma B Cells
celltypes <- c("CD68+CD4+ Monocytes" = "CD68+CD4+ Mono",
"CD68+IL18+TLR4+TREM2+ Resident macrophages" = "CD68+IL18+TLR4+TREM2+ MRes",
"CD68+CD1C+ Dendritic Cells" = "CD68+CD1C+ DC",
"CD68+CASP1+IL1B+SELL+ Inflammatory macrophages" = "CD68+CASP1+IL1B+SELL MInf",
"CD68+ABCA1+OLR1+TREM2+ Foam Cells" = "CD68+ABCA1+OLR1+TREM2+ FC",
# T-cells
"CD3+ T Cells I" = "CD3+ TC I",
"CD3+ T Cells II" = "CD3+ TC II",
"CD3+ T Cells III" = "CD3+ TC III",
"CD3+ T Cells IV" = "CD3+ TC IV",
"CD3+ T Cells V" = "CD3+ TC V",
"CD3+ T Cells VI" = "CD3+ TC VI",
"FOXP3+ T Cells" = "FOXP3+ TC",
# Endothelial cells
"CD34+ Endothelial Cells I" = "CD34+ EC I",
"CD34+ Endothelial Cells II" = "CD34+ EC II",
# SMC
"ACTA2+ Smooth Muscle Cells" = "ACTA2+ SMC",
# NK Cells
"CD3+CD56+ NK Cells I" = "CD3+CD56+ NK I",
"CD3+CD56+ NK Cells II" = "CD3+CD56+ NK II",
# Mast
"CD68+KIT+ Mast Cells" = "CD68+KIT+ MC",
"CD79A+ Class-switched Memory B Cells" = "CD79A+ BCmem",
"CD79+ Plasma B Cells" = "CD79+ BCplasma")
scRNAseqData <- Seurat::RenameIdents(object = scRNAseqData,
celltypes)UMAPPlot(scRNAseqData, label = TRUE, pt.size = 1.25, label.size = 4, group.by = "ident",
repel = TRUE)Loading the Athero-Express clinical data.
AEDB.CEA <- readRDS(file = paste0(OUT_loc, "/20220317.HDAC9.AEDB.CEA.RDS"))
# Baseline table variables
basetable_vars = c("Hospital", "ORyear", "Artery_summary",
"Age", "Gender",
# "TC_finalCU", "LDL_finalCU", "HDL_finalCU", "TG_finalCU",
"TC_final", "LDL_final", "HDL_final", "TG_final",
# "hsCRP_plasma",
"systolic", "diastoli", "GFR_MDRD", "BMI",
"KDOQI", "BMI_WHO",
"SmokerStatus", "AlcoholUse",
"DiabetesStatus",
"Hypertension.selfreport", "Hypertension.selfreportdrug", "Hypertension.composite", "Hypertension.drugs",
"Med.anticoagulants", "Med.all.antiplatelet", "Med.Statin.LLD",
"Stroke_Dx", "sympt", "Symptoms.5G", "AsymptSympt", "AsymptSympt2G",
"Symptoms.Update2G", "Symptoms.Update3G", "indexsymptoms_latest_4g",
"restenos", "stenose",
"CAD_history", "PAOD", "Peripheral.interv",
"EP_composite", "EP_composite_time", "EP_major", "EP_major_time",
"MAC_rankNorm", "SMC_rankNorm", "Macrophages.bin", "SMC.bin",
"Neutrophils_rankNorm", "MastCells_rankNorm",
"IPH.bin", "VesselDensity_rankNorm",
"Calc.bin", "Collagen.bin",
"Fat.bin_10", "Fat.bin_40", "OverallPlaquePhenotype", "Plaque_Vulnerability_Index")
basetable_bin = c("Gender", "Artery_summary",
"KDOQI", "BMI_WHO",
"SmokerStatus", "AlcoholUse",
"DiabetesStatus",
"Hypertension.selfreport", "Hypertension.selfreportdrug", "Hypertension.composite", "Hypertension.drugs",
"Med.anticoagulants", "Med.all.antiplatelet", "Med.Statin.LLD",
"Stroke_Dx", "sympt", "Symptoms.5G", "AsymptSympt", "AsymptSympt2G",
"Symptoms.Update2G", "Symptoms.Update3G", "indexsymptoms_latest_4g",
"restenos", "stenose",
"CAD_history", "PAOD", "Peripheral.interv",
"EP_major", "EP_composite", "Macrophages.bin", "SMC.bin",
"IPH.bin",
"Calc.bin", "Collagen.bin",
"Fat.bin_10", "Fat.bin_40", "OverallPlaquePhenotype", "Plaque_Vulnerability_Index")
# basetable_bin
basetable_con = basetable_vars[!basetable_vars %in% basetable_bin]
# basetable_conmetadata <- scRNAseqData@meta.data %>% as_tibble() %>% separate(orig.ident, c("Patient", NA))
scRNAseqDataMeta <- metadata %>% distinct(Patient, .keep_all = TRUE)
scRNAseqDataMetaAE <- merge(scRNAseqDataMeta, AEDB.CEA, by.x = "Patient", by.y = "STUDY_NUMBER", sort = FALSE, all.x = TRUE)
dim(scRNAseqDataMetaAE)[1] 46 1741
# Replace missing data
# Ref: https://cran.r-project.org/web/packages/naniar/vignettes/replace-with-na.html
require(naniar)
na_strings <- c("NA", "N A", "N / A", "N/A", "N/ A",
"Not Available", "Not available",
"missing",
"-999", "-99",
"No data available/missing", "No data available/Missing")
# Then you write ~.x %in% na_strings - which reads as “does this value occur in the list of NA strings”.
scRNAseqDataMetaAE %>%
replace_with_na_all(condition = ~.x %in% na_strings)cat("====================================================================================================")====================================================================================================
cat("SELECTION THE SHIZZLE")SELECTION THE SHIZZLE
cat("- sanity checking PRIOR to selection")- sanity checking PRIOR to selection
library(data.table)
require(labelled)Loading required package: labelled
ae.gender <- to_factor(scRNAseqDataMetaAE$Gender)
ae.hospital <- to_factor(scRNAseqDataMetaAE$Hospital)
table(ae.gender, ae.hospital, dnn = c("Sex", "Hospital"), useNA = "ifany") Hospital
Sex St. Antonius, Nieuwegein UMC Utrecht <NA>
female 0 18 0
male 0 26 0
<NA> 0 0 2
ae.artery <- to_factor(scRNAseqDataMetaAE$Artery_summary)
table(ae.artery, ae.gender, dnn = c("Sex", "Artery"), useNA = "ifany") Artery
Sex female male <NA>
No artery known (yet), no surgery (patient ill, died, exited study), re-numbered to AAA 0 0 0
carotid (left & right) 18 25 0
femoral/iliac (left, right or both sides) 0 0 0
other carotid arteries (common, external) 0 1 0
carotid bypass and injury (left, right or both sides) 0 0 0
aneurysmata (carotid & femoral) 0 0 0
aorta 0 0 0
other arteries (renal, popliteal, vertebral) 0 0 0
femoral bypass, angioseal and injury (left, right or both sides) 0 0 0
<NA> 0 0 2
ae.ic <- to_factor(scRNAseqDataMetaAE$informedconsent)
table(ae.ic, ae.gender, useNA = "ifany") ae.gender
ae.ic female male <NA>
no, died 0 0 0
yes 9 14 0
yes, health treatment when possible 5 7 0
yes, no health treatment 2 2 0
yes, no health treatment, no commercial business 1 2 0
yes, no tissue, no commerical business 0 0 0
yes, no tissue, no questionnaires, no medical info, no commercial business 0 0 0
yes, no questionnaires, no health treatment, no commercial business 0 0 0
yes, no questionnaires, health treatment when possible 0 0 0
yes, no tissue, no questionnaires, no health treatment, no commerical business 0 0 0
yes, no health treatment, no medical info, no commercial business 0 0 0
yes, no tissue, no questionnaires, no health treatment, no medical info, no commercial business 0 0 0
yes, no questionnaires, no health treatment 0 0 0
yes, no tissue, no health treatment 0 0 0
yes, no tissue, no questionnaires 0 0 0
yes, no tissue, health treatment when possible 0 0 0
yes, no tissue 0 0 0
yes, no commerical business 1 1 0
yes, health treatment when possible, no commercial business 0 0 0
yes, no medical info, no commercial business 0 0 0
yes, no questionnaires 0 0 0
yes, no tissue, no questionnaires, no health treatment, no medical info 0 0 0
yes, no tissue, no questionnaires, no health treatment, no commercial business 0 0 0
yes, no medical info 0 0 0
yes, no questionnaires, no commercial business 0 0 0
yes, no questionnaires, no health treatment, no medical info 0 0 0
yes, no questionnaires, health treatment when possible, no commercial business 0 0 0
yes, no health treatment, no medical info 0 0 0
no, doesn't want to 0 0 0
no, unable to sign 0 0 0
no, no reaction 0 0 0
no, lost 0 0 0
no, too old 0 0 0
yes, no medical info, health treatment when possible 0 0 0
no (never asked for IC because there was no tissue) 0 0 0
yes, no medical info, no commercial business, health treatment when possible 0 0 0
no, endpoint 0 0 0
wil niets invullen, wel alles gebruiken 0 0 0
second informed concents: yes, no commercial business 0 0 0
nooit geincludeerd 0 0 0
<NA> 0 0 2
rm(ae.gender, ae.hospital, ae.artery, ae.ic)
scRNAseqDataMetaAE.all <- subset(scRNAseqDataMetaAE,
(Artery_summary == "carotid (left & right)" | Artery_summary == "other carotid arteries (common, external)" ) & # we only want carotids
informedconsent != "missing" & # we are really strict in selecting based on 'informed consent'!
informedconsent != "no, died" &
informedconsent != "yes, no tissue, no commerical business" &
informedconsent != "yes, no tissue, no questionnaires, no medical info, no commercial business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no commerical business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no medical info, no commercial business" &
informedconsent != "yes, no tissue, no health treatment" &
informedconsent != "yes, no tissue, no questionnaires" &
informedconsent != "yes, no tissue, health treatment when possible" &
informedconsent != "yes, no tissue" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no medical info" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no commercial business" &
informedconsent != "no, doesn't want to" &
informedconsent != "no, unable to sign" &
informedconsent != "no, no reaction" &
informedconsent != "no, lost" &
informedconsent != "no, too old" &
informedconsent != "yes, no medical info, health treatment when possible" &
informedconsent != "no (never asked for IC because there was no tissue)" &
informedconsent != "no, endpoint" &
informedconsent != "nooit geincludeerd" &
informedconsent != "yes, no health treatment, no commercial business" & # IMPORTANT: since we are sharing with a commercial party
informedconsent != "yes, no tissue, no commerical business" &
informedconsent != "yes, no tissue, no questionnaires, no medical info, no commercial business" &
informedconsent != "yes, no questionnaires, no health treatment, no commercial business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no commerical business" &
informedconsent != "yes, no health treatment, no medical info, no commercial business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no medical info, no commercial business" &
informedconsent != "yes, no commerical business" &
informedconsent != "yes, health treatment when possible, no commercial business" &
informedconsent != "yes, no medical info, no commercial business" &
informedconsent != "yes, no tissue, no questionnaires, no health treatment, no commercial business" &
informedconsent != "yes, no questionnaires, no commercial business" &
informedconsent != "yes, no questionnaires, health treatment when possible, no commercial business" &
informedconsent != "second informed concents: yes, no commercial business")
# scRNAseqDataMetaAE.all[1:10, 1:10]
dim(scRNAseqDataMetaAE.all)[1] 39 1741
# DT::datatable(scRNAseqDataMetaAE.all)Showing the baseline table for the scRNAseq data in 39 CEA patients with informed consent.
cat("===========================================================================================")===========================================================================================
cat("CREATE BASELINE TABLE")CREATE BASELINE TABLE
# Create baseline tables
# http://rstudio-pubs-static.s3.amazonaws.com/13321_da314633db924dc78986a850813a50d5.html
scRNAseqDataMetaAE.all.tableOne = print(CreateTableOne(vars = basetable_vars,
# factorVars = basetable_bin,
# strata = "Gender",
data = scRNAseqDataMetaAE.all, includeNA = TRUE),
nonnormal = c(),
quote = FALSE, showAllLevels = TRUE,
format = "p",
contDigits = 3)[,1:2]Warning in ModuleReturnVarsExist(vars, data) :
These variables only have NA/NaN: MAC_rankNorm SMC_rankNorm Neutrophils_rankNorm MastCells_rankNorm IPH.bin VesselDensity_rankNorm Dropped
level
n
Hospital (%) St. Antonius, Nieuwegein
UMC Utrecht
ORyear (%) 2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
Artery_summary (%) No artery known (yet), no surgery (patient ill, died, exited study), re-numbered to AAA
carotid (left & right)
femoral/iliac (left, right or both sides)
other carotid arteries (common, external)
carotid bypass and injury (left, right or both sides)
aneurysmata (carotid & femoral)
aorta
other arteries (renal, popliteal, vertebral)
femoral bypass, angioseal and injury (left, right or both sides)
Age (mean (SD))
Gender (%) female
male
TC_final (mean (SD))
LDL_final (mean (SD))
HDL_final (mean (SD))
TG_final (mean (SD))
systolic (mean (SD))
diastoli (mean (SD))
GFR_MDRD (mean (SD))
BMI (mean (SD))
KDOQI (%) Normal kidney function
CKD 2 (Mild)
CKD 3 (Moderate)
CKD 4 (Severe)
CKD 5 (Failure)
<NA>
BMI_WHO (%) Underweight
Normal
Overweight
Obese
<NA>
SmokerStatus (%) Current smoker
Ex-smoker
Never smoked
<NA>
AlcoholUse (%) Yes
<NA>
DiabetesStatus (%) Diabetes
<NA>
Hypertension.selfreport (%) no
yes
<NA>
Hypertension.selfreportdrug (%) no
yes
<NA>
Hypertension.composite (%) no
yes
Hypertension.drugs (%) no
yes
<NA>
Med.anticoagulants (%) no
yes
<NA>
Med.all.antiplatelet (%) no
yes
<NA>
Med.Statin.LLD (%) no
yes
<NA>
Stroke_Dx (%) No stroke diagnosed
Stroke diagnosed
sympt (%) Asymptomatic
TIA
minor stroke
Major stroke
Amaurosis fugax
Four vessel disease
Vertebrobasilary TIA
Retinal infarction
Symptomatic, but aspecific symtoms
Contralateral symptomatic occlusion
retinal infarction
armclaudication due to occlusion subclavian artery, CEA needed for bypass
retinal infarction + TIAs
Ocular ischemic syndrome
ischemisch glaucoom
subclavian steal syndrome
TGA
Symptoms.5G (%) Ocular
Other
Retinal infarction
Stroke
TIA
AsymptSympt (%) Ocular and others
Symptomatic
AsymptSympt2G (%) Symptomatic
Symptoms.Update2G (%) Symptomatic
<NA>
Symptoms.Update3G (%) Symptomatic
<NA>
indexsymptoms_latest_4g (mean (SD))
restenos (%) de novo
restenosis
stenose bij angioseal na PTCA
stenose (%) 0-49%
50-70%
70-90%
90-99%
100% (Occlusion)
NA
50-99%
70-99%
99
CAD_history (%) No history CAD
History CAD
PAOD (%) no
yes
Peripheral.interv (%) no
yes
EP_composite (%) No composite endpoints
Composite endpoints
<NA>
EP_composite_time (mean (SD))
EP_major (%) No major events (endpoints)
Major events (endpoints)
<NA>
EP_major_time (mean (SD))
Macrophages.bin (%) no/minor
moderate/heavy
<NA>
SMC.bin (%) no/minor
moderate/heavy
<NA>
Calc.bin (%) no/minor
moderate/heavy
<NA>
Collagen.bin (%) no/minor
moderate/heavy
<NA>
Fat.bin_10 (%) <10%
>10%
<NA>
Fat.bin_40 (%) <40%
>40%
<NA>
OverallPlaquePhenotype (%) atheromatous
fibroatheromatous
fibrous
<NA>
Plaque_Vulnerability_Index (%) 0
1
2
3
4
5
Overall
n 39
Hospital (%) 0.0
100.0
ORyear (%) 0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
51.3
35.9
10.3
2.6
0.0
Artery_summary (%) 0.0
97.4
0.0
2.6
0.0
0.0
0.0
0.0
0.0
Age (mean (SD)) 38.077 (8.183)
Gender (%) 41.0
59.0
TC_final (mean (SD)) 4.533 (1.252)
LDL_final (mean (SD)) 2.676 (1.013)
HDL_final (mean (SD)) 1.135 (0.229)
TG_final (mean (SD)) 1.927 (1.093)
systolic (mean (SD)) 61.842 (27.013)
diastoli (mean (SD)) 40.658 (16.285)
GFR_MDRD (mean (SD)) 1386.429 (814.340)
BMI (mean (SD)) 653.250 (324.553)
KDOQI (%) 28.2
33.3
28.2
0.0
0.0
10.3
BMI_WHO (%) 2.6
33.3
38.5
17.9
7.7
SmokerStatus (%) 28.2
53.8
12.8
5.1
AlcoholUse (%) 38.5
61.5
DiabetesStatus (%) 71.8
28.2
Hypertension.selfreport (%) 7.7
87.2
5.1
Hypertension.selfreportdrug (%) 7.7
87.2
5.1
Hypertension.composite (%) 7.7
92.3
Hypertension.drugs (%) 10.3
84.6
5.1
Med.anticoagulants (%) 87.2
5.1
7.7
Med.all.antiplatelet (%) 20.5
74.4
5.1
Med.Statin.LLD (%) 20.5
74.4
5.1
Stroke_Dx (%) 56.4
43.6
sympt (%) 15.4
17.9
25.6
10.3
15.4
0.0
0.0
2.6
2.6
0.0
2.6
0.0
0.0
7.7
0.0
0.0
0.0
Symptoms.5G (%) 17.9
17.9
5.1
43.6
15.4
AsymptSympt (%) 41.0
59.0
AsymptSympt2G (%) 100.0
Symptoms.Update2G (%) 64.1
35.9
Symptoms.Update3G (%) 64.1
35.9
indexsymptoms_latest_4g (mean (SD)) 2.769 (1.111)
restenos (%) 100.0
0.0
0.0
stenose (%) 2.6
10.3
46.2
25.6
0.0
0.0
0.0
15.4
0.0
CAD_history (%) 79.5
20.5
PAOD (%) 84.6
15.4
Peripheral.interv (%) 76.9
23.1
EP_composite (%) 69.2
10.3
20.5
EP_composite_time (mean (SD)) 1.878 (1.026)
EP_major (%) 71.8
7.7
20.5
EP_major_time (mean (SD)) 1.957 (1.031)
Macrophages.bin (%) 2.6
0.0
97.4
SMC.bin (%) 0.0
2.6
97.4
Calc.bin (%) 2.6
0.0
97.4
Collagen.bin (%) 0.0
2.6
97.4
Fat.bin_10 (%) 0.0
2.6
97.4
Fat.bin_40 (%) 2.6
0.0
97.4
OverallPlaquePhenotype (%) 2.6
0.0
0.0
97.4
Plaque_Vulnerability_Index (%) 97.4
2.6
0.0
0.0
0.0
0.0
Writing the baseline table to Excel format.
# Write basetable
require(openxlsx)
# write.xlsx(file = paste0(BASELINE_loc, "/",Today,".",PROJECTNAME,".AESCRNA.CEA.39pts.after_qc.IC_commercial.BaselineTable.xlsx"),
# format(scRNAseqDataMetaAE.all.tableOne, digits = 5, scientific = FALSE) ,
# rowNames = TRUE, colNames = TRUE, overwrite = TRUE)
write.xlsx(file = paste0(BASELINE_loc, "/",Today,".",PROJECTNAME,".AESCRNA.CEA.39pts.after_qc.IC_academic.BaselineTable.xlsx"),
format(scRNAseqDataMetaAE.all.tableOne, digits = 5, scientific = FALSE) ,
rowNames = TRUE, colNames = TRUE, overwrite = TRUE)Here review the number of cells per sample, plate, and patients. And plot the ratio’s per sample and study number.
## check stuff
cat("\nHow many cells per type ...?")
How many cells per type ...?
sort(table(scRNAseqData@meta.data$SCT_snn_res.0.8))integer(0)
# cat("\n\nHow many cells per plate ...?")
# sort(table(scRNAseqData@meta.data$ID))
# cat("\n\nHow many cells per type per plate ...?")
# table(scRNAseqData@meta.data$SCT_snn_res.0.8, scRNAseqData@meta.data$ID)
cat("\n\nHow many cells per patient ...?")
How many cells per patient ...?
sort(table(scRNAseqData@meta.data$Patient))
4530 4675 4440 4605 4653 4472 4458 4455 4476 4587 4496 4601 4502 4501 4571 4478 4448 4477 4452 4459 4520 4602 4489 4432 4495 4545 4558 4480 4447
3 4 6 7 20 22 35 54 59 60 70 70 73 75 76 77 80 84 92 94 96 96 97 99 102 106 107 112 114
4500 4513 4535 4676 4486 4470 4487 4546 4488 4521 4580 4491 4541 4450 4542 4453 4443
116 123 130 135 137 144 144 144 146 161 163 175 178 205 213 222 422
cat("\n\nVisualizing these ratio's per study number and sample ...?")
Visualizing these ratio's per study number and sample ...?
UMAPPlot(scRNAseqData, label = TRUE, pt.size = 1.25, label.size = 4, group.by = "ident",
repel = TRUE)ggsave(paste0(PLOT_loc, "/", Today, ".UMAP.png"), plot = last_plot())Saving 18 x 12 in image
ggsave(paste0(PLOT_loc, "/", Today, ".UMAP.ps"), plot = last_plot())Saving 18 x 12 in image
# barplot(prop.table(x = table(scRNAseqData@active.ident, scRNAseqData@meta.data$Patient)),
# cex.axis = 1.0, cex.names = 0.5, las = 1,
# col = uithof_color, xlab = "study number", legend.text = FALSE, args.legend = list(x = "bottom"))
# dev.copy(pdf, paste0(QC_loc, "/", Today, ".cell_ratios_per_sample.pdf"))
# dev.off()
# barplot(prop.table(x = table(scRNAseqData@active.ident, scRNAseqData@meta.data$ID)),
# cex.axis = 1.0, cex.names = 0.5, las = 2,
# col = uithof_color, xlab = "sample ID", legend.text = FALSE, args.legend = list(x = "bottom"))
# dev.copy(pdf, paste0(QC_loc, "/", Today, ".cell_ratios_per_sample_per_plate.pdf"))
# dev.off()Let’s project known cellular markers.
UMAPPlot(scRNAseqData, label = FALSE, pt.size = 1.25, label.size = 4, group.by = "ident",
repel = TRUE)
# endothelial cells
FeaturePlot(scRNAseqData, features = c("CD34"), cols = c("#ECECEC", "#DB003F"))FeaturePlot(scRNAseqData, features = c("EDN1"), cols = c("#ECECEC", "#DB003F"))FeaturePlot(scRNAseqData, features = c("EDNRA", "EDNRB"), cols = c("#ECECEC", "#DB003F"))FeaturePlot(scRNAseqData, features = c("CDH5", "PECAM1"), cols = c("#ECECEC", "#DB003F"))FeaturePlot(scRNAseqData, features = c("ACKR1"), cols = c("#ECECEC", "#DB003F"))
# SMC
FeaturePlot(scRNAseqData, features = c("MYH11"), cols = c("#ECECEC", "#DB003F"))FeaturePlot(scRNAseqData, features = c("LGALS3", "ACTA2"), cols = c("#ECECEC", "#DB003F"))
# macrophages
FeaturePlot(scRNAseqData, features = c("CD14", "CD68"), cols = c("#ECECEC", "#DB003F"))FeaturePlot(scRNAseqData, features = c("CD36"), cols = c("#ECECEC", "#DB003F"))
# t-cells
FeaturePlot(scRNAseqData, features = c("CD3E"), cols = c("#ECECEC", "#DB003F"))FeaturePlot(scRNAseqData, features = c("CD4"), cols = c("#ECECEC", "#DB003F"))# FeaturePlot(scRNAseqData, features = c("CD8"), cols = c("#ECECEC", "#DB003F"))
# b-cells
FeaturePlot(scRNAseqData, features = c("CD79A"), cols = c("#ECECEC", "#DB003F"))
# mast cells
FeaturePlot(scRNAseqData, features = c("KIT"), cols = c("#ECECEC", "#DB003F"))
# NK cells
FeaturePlot(scRNAseqData, features = c("NCAM1"), cols = c("#ECECEC", "#DB003F"))We check whether the targets genes were sequenced using our method.
length(target_genes)[1] 4
target_genes[1] "HDAC9" "TWIST1" "IL6" "IL1B"
# target_genes_rm <- c("AC011294.3", "C6orf195", "C9orf53", "AL137026.1", "RP11-145E5.5",
# "ZNF32", "BCAM", "DUPD1", "PVRL2")
#
# temp = target_genes[!target_genes %in% target_genes_rm]
#
# target_genes_qc <- c(temp, "DUSP27", "NECTIN2")
target_genes_qc <- target_genes
target_genes_qc[1] "HDAC9" "TWIST1" "IL6" "IL1B"
library(RColorBrewer)
p1 <- DotPlot(scRNAseqData, features = target_genes_qc,
cols = "RdBu")
p1 + theme(axis.text.x = element_text(angle = 45, hjust=1, size = 5))
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.Targets.png"), plot = last_plot())Saving 18 x 12 in image
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.Targets.ps"), plot = last_plot())Saving 18 x 12 in image
ggsave(paste0(PLOT_loc, "/", Today, ".DotPlot.Targets.pdf"), plot = last_plot())Saving 18 x 12 in image
rm(p1)
# FeaturePlot(scRNAseqData, features = c(target_genes_qc),
# cols = c("#ECECEC", "#DB003F", "#9A3480","#1290D9"),
# combine = TRUE)
#
# ggsave(paste0(PLOT_loc, "/", Today, ".FeaturePlot.Targets.png"), plot = last_plot())
# ggsave(paste0(PLOT_loc, "/", Today, ".FeaturePlot.Targets.ps"), plot = last_plot())# VlnPlot(scRNAseqData, features = "DUSP27")
# VlnPlot files
ifelse(!dir.exists(file.path(PLOT_loc, "/VlnPlot")),
dir.create(file.path(PLOT_loc, "/VlnPlot")),
FALSE)[1] TRUE
VlnPlot_loc = paste0(PLOT_loc, "/VlnPlot")
for (GENE in target_genes_qc){
print(paste0("Projecting the expression of ", GENE, "."))
vp1 <- VlnPlot(scRNAseqData, features = GENE) +
xlab("cell communities") +
ylab(bquote("normalized expression")) +
theme(axis.title.x = element_text(color = "#000000", size = 14, face = "bold"),
axis.title.y = element_text(color = "#000000", size = 14, face = "bold"),
legend.position = "none")
ggsave(paste0(VlnPlot_loc, "/", Today, ".VlnPlot.",GENE,".png"), plot = last_plot())
ggsave(paste0(VlnPlot_loc, "/", Today, ".VlnPlot.",GENE,".ps"), plot = last_plot())
ggsave(paste0(VlnPlot_loc, "/", Today, ".VlnPlot.",GENE,".pdf"), plot = last_plot())
# print(vp1)
}[1] "Projecting the expression of HDAC9."
Saving 7 x 7 in image
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of TWIST1."
Saving 7 x 7 in image
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of IL6."
Saving 7 x 7 in image
Saving 7 x 7 in image
Saving 7 x 7 in image
[1] "Projecting the expression of IL1B."
Saving 7 x 7 in image
Saving 7 x 7 in image
Saving 7 x 7 in image
Here we project genes to only the broad cell communities:
unique(scRNAseqData@active.ident) [1] CD3+ TC I CD3+ TC IV CD34+ EC I CD3+ TC V CD3+CD56+ NK II
[6] CD3+ TC VI CD68+IL18+TLR4+TREM2+ MRes CD3+CD56+ NK I ACTA2+ SMC CD3+ TC II
[11] FOXP3+ TC CD34+ EC II CD3+ TC III CD68+CD1C+ DC CD68+CASP1+IL1B+SELL MInf
[16] CD79A+ BCmem CD68+ABCA1+OLR1+TREM2+ FC CD68+KIT+ MC CD68+CD4+ Mono CD79+ BCplasma
20 Levels: CD68+CD4+ Mono CD68+IL18+TLR4+TREM2+ MRes CD68+CD1C+ DC CD68+CASP1+IL1B+SELL MInf CD68+ABCA1+OLR1+TREM2+ FC CD3+ TC I ... CD79+ BCplasma
Comparison between the macrophages cell communities (CD14/CD68+), and all other communities.
MAC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD68+CASP1+IL1B+SELL MInf",
"CD68+CD1C+ DC",
"CD68+CD4+ Mono",
"CD68+IL18+TLR4+TREM2+ MRes",
"CD68+ABCA1+OLR1+TREM2+ FC"),
ident.2 = c(#"CD68+CASP1+IL1B+SELL MInf",
#"CD68+CD1C+ DC",
#"CD68+CD4+ Mono",
#"CD68+IL18+TLR4+TREM2+ MRes",
#"CD68+ABCA1+OLR1+TREM2+ FC",
"CD3+ TC I",
"CD3+ TC II",
"CD3+ TC III",
"CD3+ TC IV",
"CD3+ TC V",
"CD3+ TC VI",
"FOXP3+ TC",
"CD34+ EC I",
"CD34+ EC II",
"ACTA2+ SMC",
"CD3+CD56+ NK I",
"CD3+CD56+ NK II",
"CD68+KIT+ MC",
"CD79+ BCplasma",
"CD79A+ BCmem"))For a more efficient implementation of the Wilcoxon Rank Sum Test,
(default method for FindMarkers) please install the limma package
--------------------------------------------
install.packages('BiocManager')
BiocManager::install('limma')
--------------------------------------------
After installation of limma, Seurat will automatically use the more
efficient implementation (no further action necessary).
This message will be shown once per session
| | 0 % ~calculating
|+ | 1 % ~03m 07s
|++ | 2 % ~02m 37s
|++ | 3 % ~02m 25s
|+++ | 4 % ~02m 24s
|+++ | 5 % ~02m 29s
|++++ | 6 % ~02m 34s
|++++ | 7 % ~02m 30s
|+++++ | 8 % ~02m 30s
|+++++ | 9 % ~02m 29s
|++++++ | 10% ~02m 24s
|++++++ | 11% ~02m 18s
|+++++++ | 12% ~02m 13s
|+++++++ | 13% ~02m 10s
|++++++++ | 14% ~02m 06s
|++++++++ | 15% ~02m 03s
|+++++++++ | 16% ~02m 01s
|+++++++++ | 17% ~01m 59s
|++++++++++ | 18% ~01m 57s
|++++++++++ | 19% ~01m 54s
|+++++++++++ | 20% ~01m 52s
|+++++++++++ | 21% ~01m 50s
|++++++++++++ | 22% ~01m 48s
|++++++++++++ | 23% ~01m 46s
|+++++++++++++ | 24% ~01m 44s
|+++++++++++++ | 25% ~01m 42s
|++++++++++++++ | 26% ~01m 40s
|++++++++++++++ | 27% ~01m 38s
|+++++++++++++++ | 28% ~01m 36s
|+++++++++++++++ | 29% ~01m 34s
|++++++++++++++++ | 30% ~01m 32s
|++++++++++++++++ | 31% ~01m 33s
|+++++++++++++++++ | 32% ~01m 31s
|+++++++++++++++++ | 33% ~01m 30s
|++++++++++++++++++ | 34% ~01m 28s
|++++++++++++++++++ | 35% ~01m 26s
|+++++++++++++++++++ | 36% ~01m 24s
|+++++++++++++++++++ | 37% ~01m 22s
|++++++++++++++++++++ | 38% ~01m 21s
|++++++++++++++++++++ | 39% ~01m 19s
|+++++++++++++++++++++ | 40% ~01m 17s
|+++++++++++++++++++++ | 41% ~01m 16s
|++++++++++++++++++++++ | 42% ~01m 14s
|++++++++++++++++++++++ | 43% ~01m 13s
|+++++++++++++++++++++++ | 44% ~01m 11s
|+++++++++++++++++++++++ | 45% ~01m 10s
|++++++++++++++++++++++++ | 46% ~01m 08s
|++++++++++++++++++++++++ | 47% ~01m 07s
|+++++++++++++++++++++++++ | 48% ~01m 05s
|+++++++++++++++++++++++++ | 49% ~01m 04s
|++++++++++++++++++++++++++ | 51% ~01m 03s
|++++++++++++++++++++++++++ | 52% ~01m 01s
|+++++++++++++++++++++++++++ | 53% ~01m 00s
|+++++++++++++++++++++++++++ | 54% ~59s
|++++++++++++++++++++++++++++ | 55% ~58s
|++++++++++++++++++++++++++++ | 56% ~56s
|+++++++++++++++++++++++++++++ | 57% ~55s
|+++++++++++++++++++++++++++++ | 58% ~54s
|++++++++++++++++++++++++++++++ | 59% ~52s
|++++++++++++++++++++++++++++++ | 60% ~51s
|+++++++++++++++++++++++++++++++ | 61% ~50s
|+++++++++++++++++++++++++++++++ | 62% ~48s
|++++++++++++++++++++++++++++++++ | 63% ~47s
|++++++++++++++++++++++++++++++++ | 64% ~46s
|+++++++++++++++++++++++++++++++++ | 65% ~45s
|+++++++++++++++++++++++++++++++++ | 66% ~43s
|++++++++++++++++++++++++++++++++++ | 67% ~42s
|++++++++++++++++++++++++++++++++++ | 68% ~41s
|+++++++++++++++++++++++++++++++++++ | 69% ~39s
|+++++++++++++++++++++++++++++++++++ | 70% ~38s
|++++++++++++++++++++++++++++++++++++ | 71% ~37s
|++++++++++++++++++++++++++++++++++++ | 72% ~35s
|+++++++++++++++++++++++++++++++++++++ | 73% ~34s
|+++++++++++++++++++++++++++++++++++++ | 74% ~33s
|++++++++++++++++++++++++++++++++++++++ | 75% ~32s
|++++++++++++++++++++++++++++++++++++++ | 76% ~30s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~29s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~28s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~26s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~25s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~24s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~23s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~21s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~20s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~19s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~17s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~16s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~15s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~14s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~12s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~11s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~10s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~09s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~07s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~06s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~05s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=02m 01s
DT::datatable(MAC.markers)MAC_Volcano_TargetsA = EnhancedVolcano(MAC.markers,
lab = rownames(MAC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "Macrophage markers\n(Macrophage communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/(nrow(MAC.markers)), # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
MAC_Volcano_TargetsAggsave(paste0(PLOT_loc, "/", Today, ".Volcano.MAC.DEG.Targets.pdf"),
plot = MAC_Volcano_TargetsA)Saving 18 x 12 in image
The target results are given below and written to a file.
library(tibble)
MAC.markers <- add_column(MAC.markers, Gene = row.names(MAC.markers), .before = 1)
temp <- MAC.markers[MAC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)fwrite(temp, file = paste0(OUT_loc, "/", Today, ".MAC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)Comparison between the smooth muscle cell communities (ACTA2+), and all other communities.
SMC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("ACTA2+ SMC"),
ident.2 = c("CD68+CASP1+IL1B+SELL MInf",
"CD68+CD1C+ DC",
"CD68+CD4+ Mono",
"CD68+IL18+TLR4+TREM2+ MRes",
"CD68+ABCA1+OLR1+TREM2+ FC",
"CD3+ TC I",
"CD3+ TC II",
"CD3+ TC III",
"CD3+ TC IV",
"CD3+ TC V",
"CD3+ TC VI",
"FOXP3+ TC",
"CD34+ EC I",
"CD34+ EC II",
#"ACTA2+ SMC",
"CD3+CD56+ NK I",
"CD3+CD56+ NK II",
"CD68+KIT+ MC",
"CD79+ BCplasma",
"CD79A+ BCmem"))
| | 0 % ~calculating
|+ | 1 % ~02m 35s
|++ | 2 % ~02m 23s
|++ | 3 % ~02m 24s
|+++ | 4 % ~02m 18s
|+++ | 5 % ~02m 17s
|++++ | 6 % ~02m 19s
|++++ | 7 % ~02m 25s
|+++++ | 8 % ~02m 22s
|+++++ | 9 % ~02m 23s
|++++++ | 10% ~02m 22s
|++++++ | 11% ~02m 21s
|+++++++ | 12% ~02m 21s
|+++++++ | 13% ~02m 19s
|++++++++ | 14% ~02m 16s
|++++++++ | 15% ~02m 14s
|+++++++++ | 16% ~02m 12s
|+++++++++ | 17% ~02m 11s
|++++++++++ | 18% ~02m 09s
|++++++++++ | 19% ~02m 08s
|+++++++++++ | 20% ~02m 06s
|+++++++++++ | 21% ~02m 04s
|++++++++++++ | 22% ~02m 03s
|++++++++++++ | 23% ~02m 01s
|+++++++++++++ | 24% ~01m 59s
|+++++++++++++ | 26% ~01m 57s
|++++++++++++++ | 27% ~01m 55s
|++++++++++++++ | 28% ~01m 53s
|+++++++++++++++ | 29% ~01m 51s
|+++++++++++++++ | 30% ~01m 49s
|++++++++++++++++ | 31% ~01m 47s
|++++++++++++++++ | 32% ~01m 46s
|+++++++++++++++++ | 33% ~01m 44s
|+++++++++++++++++ | 34% ~01m 43s
|++++++++++++++++++ | 35% ~01m 41s
|++++++++++++++++++ | 36% ~01m 39s
|+++++++++++++++++++ | 37% ~01m 37s
|+++++++++++++++++++ | 38% ~01m 36s
|++++++++++++++++++++ | 39% ~01m 35s
|++++++++++++++++++++ | 40% ~01m 34s
|+++++++++++++++++++++ | 41% ~01m 32s
|+++++++++++++++++++++ | 42% ~01m 30s
|++++++++++++++++++++++ | 43% ~01m 29s
|++++++++++++++++++++++ | 44% ~01m 32s
|+++++++++++++++++++++++ | 45% ~01m 30s
|+++++++++++++++++++++++ | 46% ~01m 30s
|++++++++++++++++++++++++ | 47% ~01m 27s
|++++++++++++++++++++++++ | 48% ~01m 26s
|+++++++++++++++++++++++++ | 49% ~01m 24s
|+++++++++++++++++++++++++ | 50% ~01m 22s
|++++++++++++++++++++++++++ | 51% ~01m 20s
|+++++++++++++++++++++++++++ | 52% ~01m 18s
|+++++++++++++++++++++++++++ | 53% ~01m 16s
|++++++++++++++++++++++++++++ | 54% ~01m 15s
|++++++++++++++++++++++++++++ | 55% ~01m 13s
|+++++++++++++++++++++++++++++ | 56% ~01m 11s
|+++++++++++++++++++++++++++++ | 57% ~01m 09s
|++++++++++++++++++++++++++++++ | 58% ~01m 07s
|++++++++++++++++++++++++++++++ | 59% ~01m 06s
|+++++++++++++++++++++++++++++++ | 60% ~01m 04s
|+++++++++++++++++++++++++++++++ | 61% ~01m 04s
|++++++++++++++++++++++++++++++++ | 62% ~01m 02s
|++++++++++++++++++++++++++++++++ | 63% ~60s
|+++++++++++++++++++++++++++++++++ | 64% ~58s
|+++++++++++++++++++++++++++++++++ | 65% ~56s
|++++++++++++++++++++++++++++++++++ | 66% ~54s
|++++++++++++++++++++++++++++++++++ | 67% ~52s
|+++++++++++++++++++++++++++++++++++ | 68% ~50s
|+++++++++++++++++++++++++++++++++++ | 69% ~49s
|++++++++++++++++++++++++++++++++++++ | 70% ~47s
|++++++++++++++++++++++++++++++++++++ | 71% ~45s
|+++++++++++++++++++++++++++++++++++++ | 72% ~43s
|+++++++++++++++++++++++++++++++++++++ | 73% ~42s
|++++++++++++++++++++++++++++++++++++++ | 74% ~40s
|++++++++++++++++++++++++++++++++++++++ | 76% ~38s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~37s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~35s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~37s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~35s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~35s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~33s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~31s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~29s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~27s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~26s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~24s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~22s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~20s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~18s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~16s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~14s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~12s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~11s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~09s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~07s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~05s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=02m 49s
DT::datatable(SMC.markers)SMC_Volcano_TargetsA = EnhancedVolcano(SMC.markers,
lab = rownames(SMC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "SMC markers\n(SMC communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/(nrow(SMC.markers)), # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
SMC_Volcano_TargetsAggsave(paste0(PLOT_loc, "/", Today, ".Volcano.SMC.DEG.Targets.pdf"),
plot = SMC_Volcano_TargetsA)Saving 18 x 12 in image
The target results are given below and written to a file.
library(tibble)
SMC.markers <- add_column(SMC.markers, Gene = row.names(SMC.markers), .before = 1)
temp <- SMC.markers[SMC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)fwrite(temp, file = paste0(OUT_loc, "/", Today, ".SMC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)Comparison between the endothelial cell communities (CD34+), and all other communities.
EC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD34+ EC I",
"CD34+ EC II"),
ident.2 = c("CD68+CASP1+IL1B+SELL MInf",
"CD68+CD1C+ DC",
"CD68+CD4+ Mono",
"CD68+IL18+TLR4+TREM2+ MRes",
"CD68+ABCA1+OLR1+TREM2+ FC",
"CD3+ TC I",
"CD3+ TC II",
"CD3+ TC III",
"CD3+ TC IV",
"CD3+ TC V",
"CD3+ TC VI",
"FOXP3+ TC",
# "CD34+ EC I",
# "CD34+ EC II",
"ACTA2+ SMC",
"CD3+CD56+ NK I",
"CD3+CD56+ NK II",
"CD68+KIT+ MC",
"CD79+ BCplasma",
"CD79A+ BCmem"))
| | 0 % ~calculating
|+ | 1 % ~01m 47s
|++ | 2 % ~01m 44s
|++ | 3 % ~01m 44s
|+++ | 4 % ~01m 45s
|+++ | 5 % ~01m 44s
|++++ | 6 % ~01m 42s
|++++ | 7 % ~01m 41s
|+++++ | 8 % ~01m 40s
|+++++ | 9 % ~01m 53s
|++++++ | 10% ~01m 50s
|++++++ | 11% ~01m 47s
|+++++++ | 12% ~01m 45s
|+++++++ | 13% ~01m 44s
|++++++++ | 14% ~01m 41s
|++++++++ | 15% ~01m 40s
|+++++++++ | 16% ~01m 38s
|+++++++++ | 17% ~01m 36s
|++++++++++ | 18% ~01m 35s
|++++++++++ | 19% ~01m 33s
|+++++++++++ | 20% ~01m 32s
|+++++++++++ | 21% ~01m 31s
|++++++++++++ | 22% ~07h 01m 16s
|++++++++++++ | 23% ~06h 37m 50s
|+++++++++++++ | 24% ~06h 16m 18s
|+++++++++++++ | 25% ~05h 56m 29s
|++++++++++++++ | 26% ~05h 38m 16s
|++++++++++++++ | 27% ~05h 21m 23s
|+++++++++++++++ | 28% ~05h 06m 56s
|+++++++++++++++ | 29% ~04h 52m 57s
|++++++++++++++++ | 30% ~04h 39m 22s
|++++++++++++++++ | 31% ~04h 26m 35s
|+++++++++++++++++ | 32% ~08h 25m 03s
|+++++++++++++++++ | 33% ~08h 02m 30s
|++++++++++++++++++ | 34% ~07h 41m 17s
|++++++++++++++++++ | 35% ~07h 21m 16s
|+++++++++++++++++++ | 36% ~07h 02m 45s
|+++++++++++++++++++ | 37% ~06h 45m 05s
|++++++++++++++++++++ | 38% ~06h 28m 46s
|++++++++++++++++++++ | 39% ~06h 12m 48s
|+++++++++++++++++++++ | 40% ~05h 57m 30s
|+++++++++++++++++++++ | 41% ~07h 17m 25s
|++++++++++++++++++++++ | 42% ~06h 59m 41s
|++++++++++++++++++++++ | 43% ~07h 01m 38s
|+++++++++++++++++++++++ | 44% ~06h 44m 46s
|+++++++++++++++++++++++ | 45% ~06h 28m 41s
|++++++++++++++++++++++++ | 46% ~06h 13m 15s
|++++++++++++++++++++++++ | 47% ~05h 58m 28s
|+++++++++++++++++++++++++ | 48% ~05h 44m 19s
|+++++++++++++++++++++++++ | 49% ~05h 30m 43s
|++++++++++++++++++++++++++ | 51% ~05h 17m 39s
|++++++++++++++++++++++++++ | 52% ~05h 05m 06s
|+++++++++++++++++++++++++++ | 53% ~04h 53m 01s
|+++++++++++++++++++++++++++ | 54% ~04h 41m 24s
|++++++++++++++++++++++++++++ | 55% ~04h 30m 12s
|++++++++++++++++++++++++++++ | 56% ~04h 19m 25s
|+++++++++++++++++++++++++++++ | 57% ~04h 09m 01s
|+++++++++++++++++++++++++++++ | 58% ~03h 58m 59s
|++++++++++++++++++++++++++++++ | 59% ~03h 49m 17s
|++++++++++++++++++++++++++++++ | 60% ~03h 39m 56s
|+++++++++++++++++++++++++++++++ | 61% ~03h 30m 52s
|+++++++++++++++++++++++++++++++ | 62% ~03h 22m 07s
|++++++++++++++++++++++++++++++++ | 63% ~03h 13m 38s
|++++++++++++++++++++++++++++++++ | 64% ~03h 05m 26s
|+++++++++++++++++++++++++++++++++ | 65% ~03h 57m 51s
|+++++++++++++++++++++++++++++++++ | 66% ~03h 47m 36s
|++++++++++++++++++++++++++++++++++ | 67% ~03h 37m 38s
|++++++++++++++++++++++++++++++++++ | 68% ~03h 27m 55s
|+++++++++++++++++++++++++++++++++++ | 69% ~03h 18m 29s
|+++++++++++++++++++++++++++++++++++ | 70% ~03h 09m 18s
|++++++++++++++++++++++++++++++++++++ | 71% ~03h 00m 24s
|++++++++++++++++++++++++++++++++++++ | 72% ~02h 51m 44s
|+++++++++++++++++++++++++++++++++++++ | 73% ~02h 43m 19s
|+++++++++++++++++++++++++++++++++++++ | 74% ~02h 35m 08s
|++++++++++++++++++++++++++++++++++++++ | 75% ~02h 27m 10s
|++++++++++++++++++++++++++++++++++++++ | 76% ~02h 19m 25s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~02h 11m 53s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~02h 04m 31s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~01h 57m 21s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~01h 50m 21s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~01h 43m 32s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~01h 36m 53s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~01h 30m 23s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~01h 24m 03s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~01h 17m 52s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~01h 11m 49s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~01h 05m 55s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~01h 00m 09s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~54m 31s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~49m 00s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~43m 37s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~38m 21s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~33m 11s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~28m 09s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~23m 12s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~18m 22s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~13m 38s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~08m 60s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~04m 27s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=07h 16m 22s
DT::datatable(EC.markers)EC_Volcano_TargetsA = EnhancedVolcano(EC.markers,
lab = rownames(EC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "Endothelial cell markers\n(EC communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/(nrow(EC.markers)), # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
EC_Volcano_TargetsAggsave(paste0(PLOT_loc, "/", Today, ".Volcano.EC.DEG.Targets.pdf"),
plot = EC_Volcano_TargetsA)Saving 18 x 12 in image
The target results are given below and written to a file.
library(tibble)
EC.markers <- add_column(EC.markers, Gene = row.names(EC.markers), .before = 1)
temp <- EC.markers[EC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)fwrite(temp, file = paste0(OUT_loc, "/", Today, ".EC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)Comparison between the T-cell communities (CD3/CD4/CD8+), and all other communities.
TC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD3+ TC I",
"CD3+ TC II",
"CD3+ TC III",
"CD3+ TC IV",
"CD3+ TC V",
"CD3+ TC VI",
"FOXP3+ TC"),
ident.2 = c("CD68+CASP1+IL1B+SELL MInf",
"CD68+CD1C+ DC",
"CD68+CD4+ Mono",
"CD68+IL18+TLR4+TREM2+ MRes",
"CD68+ABCA1+OLR1+TREM2+ FC",
# "CD3+ TC I",
# "CD3+ TC II",
# "CD3+ TC III",
# "CD3+ TC IV",
# "CD3+ TC V",
# "CD3+ TC VI",
# "FOXP3+ TC",
"CD34+ EC I",
"CD34+ EC II",
"ACTA2+ SMC",
"CD3+CD56+ NK I",
"CD3+CD56+ NK II",
"CD68+KIT+ MC",
"CD79+ BCplasma",
"CD79A+ BCmem"))
| | 0 % ~calculating
|+ | 1 % ~02m 09s
|++ | 2 % ~01m 56s
|++ | 3 % ~01m 57s
|+++ | 4 % ~01m 59s
|+++ | 5 % ~02m 02s
|++++ | 6 % ~02m 01s
|++++ | 7 % ~01m 59s
|+++++ | 8 % ~01m 59s
|+++++ | 9 % ~01m 58s
|++++++ | 10% ~01m 58s
|++++++ | 11% ~01m 56s
|+++++++ | 12% ~01m 55s
|+++++++ | 13% ~01m 54s
|++++++++ | 14% ~01m 51s
|++++++++ | 15% ~01m 49s
|+++++++++ | 16% ~01m 46s
|+++++++++ | 17% ~01m 45s
|++++++++++ | 18% ~01m 43s
|++++++++++ | 19% ~01m 42s
|+++++++++++ | 20% ~01m 41s
|+++++++++++ | 21% ~01m 39s
|++++++++++++ | 22% ~01m 37s
|++++++++++++ | 23% ~01m 35s
|+++++++++++++ | 24% ~01m 34s
|+++++++++++++ | 26% ~01m 33s
|++++++++++++++ | 27% ~01m 33s
|++++++++++++++ | 28% ~01m 31s
|+++++++++++++++ | 29% ~01m 29s
|+++++++++++++++ | 30% ~01m 28s
|++++++++++++++++ | 31% ~01m 26s
|++++++++++++++++ | 32% ~01m 24s
|+++++++++++++++++ | 33% ~01m 23s
|+++++++++++++++++ | 34% ~01m 21s
|++++++++++++++++++ | 35% ~01m 20s
|++++++++++++++++++ | 36% ~01m 19s
|+++++++++++++++++++ | 37% ~01m 17s
|+++++++++++++++++++ | 38% ~01m 16s
|++++++++++++++++++++ | 39% ~01m 14s
|++++++++++++++++++++ | 40% ~01m 13s
|+++++++++++++++++++++ | 41% ~01m 12s
|+++++++++++++++++++++ | 42% ~01m 11s
|++++++++++++++++++++++ | 43% ~01m 10s
|++++++++++++++++++++++ | 44% ~01m 09s
|+++++++++++++++++++++++ | 45% ~01m 07s
|+++++++++++++++++++++++ | 46% ~01m 06s
|++++++++++++++++++++++++ | 47% ~01m 04s
|++++++++++++++++++++++++ | 48% ~01m 06s
|+++++++++++++++++++++++++ | 49% ~01m 04s
|+++++++++++++++++++++++++ | 50% ~01m 03s
|++++++++++++++++++++++++++ | 51% ~01m 01s
|+++++++++++++++++++++++++++ | 52% ~60s
|+++++++++++++++++++++++++++ | 53% ~58s
|++++++++++++++++++++++++++++ | 54% ~57s
|++++++++++++++++++++++++++++ | 55% ~56s
|+++++++++++++++++++++++++++++ | 56% ~54s
|+++++++++++++++++++++++++++++ | 57% ~53s
|++++++++++++++++++++++++++++++ | 58% ~52s
|++++++++++++++++++++++++++++++ | 59% ~50s
|+++++++++++++++++++++++++++++++ | 60% ~49s
|+++++++++++++++++++++++++++++++ | 61% ~48s
|++++++++++++++++++++++++++++++++ | 62% ~47s
|++++++++++++++++++++++++++++++++ | 63% ~45s
|+++++++++++++++++++++++++++++++++ | 64% ~44s
|+++++++++++++++++++++++++++++++++ | 65% ~43s
|++++++++++++++++++++++++++++++++++ | 66% ~41s
|++++++++++++++++++++++++++++++++++ | 67% ~40s
|+++++++++++++++++++++++++++++++++++ | 68% ~38s
|+++++++++++++++++++++++++++++++++++ | 69% ~37s
|++++++++++++++++++++++++++++++++++++ | 70% ~36s
|++++++++++++++++++++++++++++++++++++ | 71% ~35s
|+++++++++++++++++++++++++++++++++++++ | 72% ~33s
|+++++++++++++++++++++++++++++++++++++ | 73% ~32s
|++++++++++++++++++++++++++++++++++++++ | 74% ~31s
|++++++++++++++++++++++++++++++++++++++ | 76% ~29s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~28s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~27s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~26s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~24s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~23s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~22s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~21s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~20s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~18s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~17s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~16s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~15s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~13s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~12s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~11s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~10s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~08s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~07s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~06s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~05s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 59s
DT::datatable(TC.markers)TC_Volcano_TargetsA = EnhancedVolcano(TC.markers,
lab = rownames(TC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "T-cell markers\n(T-cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/nrow(TC.markers), # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
TC_Volcano_TargetsAggsave(paste0(PLOT_loc, "/", Today, ".Volcano.TC.DEG.Targets.pdf"),
plot = TC_Volcano_TargetsA)Saving 18 x 12 in image
The target results are given below and written to a file.
library(tibble)
TC.markers <- add_column(TC.markers, Gene = row.names(TC.markers), .before = 1)
temp <- TC.markers[TC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)fwrite(temp, file = paste0(OUT_loc, "/", Today, ".TC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)Comparison between the B-cell communities (CD79A+), and all other communities.
BC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD79+ BCplasma",
"CD79A+ BCmem"),
ident.2 = c("CD68+CASP1+IL1B+SELL MInf",
"CD68+CD1C+ DC",
"CD68+CD4+ Mono",
"CD68+IL18+TLR4+TREM2+ MRes",
"CD68+ABCA1+OLR1+TREM2+ FC",
"CD3+ TC I",
"CD3+ TC II",
"CD3+ TC III",
"CD3+ TC IV",
"CD3+ TC V",
"CD3+ TC VI",
"FOXP3+ TC",
"CD34+ EC I",
"CD34+ EC II",
"ACTA2+ SMC",
"CD3+CD56+ NK I",
"CD3+CD56+ NK II",
"CD68+KIT+ MC"
# "CD79+ BCplasma",
# "CD79A+ BCmem"
))
| | 0 % ~calculating
|+ | 1 % ~01m 48s
|+ | 2 % ~01m 39s
|++ | 3 % ~01m 43s
|++ | 4 % ~01m 44s
|+++ | 5 % ~01m 40s
|+++ | 6 % ~01m 44s
|++++ | 7 % ~01m 44s
|++++ | 8 % ~01m 41s
|+++++ | 9 % ~01m 40s
|+++++ | 10% ~01m 38s
|++++++ | 11% ~01m 36s
|++++++ | 12% ~01m 50s
|+++++++ | 13% ~01m 48s
|+++++++ | 14% ~01m 45s
|++++++++ | 15% ~01m 42s
|++++++++ | 16% ~01m 40s
|+++++++++ | 17% ~01m 38s
|+++++++++ | 18% ~01m 36s
|++++++++++ | 19% ~01m 34s
|++++++++++ | 20% ~01m 32s
|+++++++++++ | 21% ~01m 30s
|+++++++++++ | 22% ~01m 29s
|++++++++++++ | 23% ~01m 27s
|++++++++++++ | 24% ~01m 26s
|+++++++++++++ | 25% ~01m 25s
|+++++++++++++ | 26% ~01m 24s
|++++++++++++++ | 27% ~01m 22s
|++++++++++++++ | 28% ~01m 21s
|+++++++++++++++ | 29% ~01m 19s
|+++++++++++++++ | 30% ~01m 18s
|++++++++++++++++ | 31% ~01m 16s
|++++++++++++++++ | 32% ~01m 15s
|+++++++++++++++++ | 33% ~01m 14s
|+++++++++++++++++ | 34% ~01m 12s
|++++++++++++++++++ | 35% ~01m 11s
|++++++++++++++++++ | 36% ~01m 10s
|+++++++++++++++++++ | 37% ~01m 09s
|+++++++++++++++++++ | 38% ~01m 08s
|++++++++++++++++++++ | 39% ~01m 07s
|++++++++++++++++++++ | 40% ~01m 05s
|+++++++++++++++++++++ | 41% ~01m 05s
|+++++++++++++++++++++ | 42% ~01m 03s
|++++++++++++++++++++++ | 43% ~01m 02s
|++++++++++++++++++++++ | 44% ~01m 01s
|+++++++++++++++++++++++ | 45% ~60s
|+++++++++++++++++++++++ | 46% ~59s
|++++++++++++++++++++++++ | 47% ~58s
|++++++++++++++++++++++++ | 48% ~56s
|+++++++++++++++++++++++++ | 49% ~55s
|+++++++++++++++++++++++++ | 50% ~54s
|++++++++++++++++++++++++++ | 51% ~53s
|++++++++++++++++++++++++++ | 52% ~52s
|+++++++++++++++++++++++++++ | 53% ~51s
|+++++++++++++++++++++++++++ | 54% ~50s
|++++++++++++++++++++++++++++ | 55% ~49s
|++++++++++++++++++++++++++++ | 56% ~48s
|+++++++++++++++++++++++++++++ | 57% ~46s
|+++++++++++++++++++++++++++++ | 58% ~45s
|++++++++++++++++++++++++++++++ | 59% ~44s
|++++++++++++++++++++++++++++++ | 60% ~43s
|+++++++++++++++++++++++++++++++ | 61% ~42s
|+++++++++++++++++++++++++++++++ | 62% ~41s
|++++++++++++++++++++++++++++++++ | 63% ~40s
|++++++++++++++++++++++++++++++++ | 64% ~39s
|+++++++++++++++++++++++++++++++++ | 65% ~38s
|+++++++++++++++++++++++++++++++++ | 66% ~37s
|++++++++++++++++++++++++++++++++++ | 67% ~35s
|++++++++++++++++++++++++++++++++++ | 68% ~34s
|+++++++++++++++++++++++++++++++++++ | 69% ~33s
|+++++++++++++++++++++++++++++++++++ | 70% ~32s
|++++++++++++++++++++++++++++++++++++ | 71% ~31s
|++++++++++++++++++++++++++++++++++++ | 72% ~30s
|+++++++++++++++++++++++++++++++++++++ | 73% ~29s
|+++++++++++++++++++++++++++++++++++++ | 74% ~28s
|++++++++++++++++++++++++++++++++++++++ | 75% ~27s
|++++++++++++++++++++++++++++++++++++++ | 76% ~26s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~24s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~23s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~22s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~21s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~20s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~19s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~18s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~17s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~16s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~15s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~14s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~13s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~12s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~11s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~10s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~08s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~07s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~06s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~05s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~03s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~02s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=01m 46s
DT::datatable(BC.markers)BC_Volcano_TargetsA = EnhancedVolcano(BC.markers,
lab = rownames(BC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "B-cell markers\n(B-cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/nrow(BC.markers), # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
BC_Volcano_TargetsAggsave(paste0(PLOT_loc, "/", Today, ".Volcano.BC.DEG.Targets.pdf"),
plot = BC_Volcano_TargetsA)Saving 18 x 12 in image
The target results are given below and written to a file.
library(tibble)
BC.markers <- add_column(BC.markers, Gene = row.names(BC.markers), .before = 1)
temp <- BC.markers[BC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)fwrite(temp, file = paste0(OUT_loc, "/", Today, ".BC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)Comparison between the mast cell communities (KIT+), and all other communities.
MC.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD68+KIT+ MC"),
ident.2 = c("CD68+CASP1+IL1B+SELL MInf",
"CD68+CD1C+ DC",
"CD68+CD4+ Mono",
"CD68+IL18+TLR4+TREM2+ MRes",
"CD68+ABCA1+OLR1+TREM2+ FC",
"CD3+ TC I",
"CD3+ TC II",
"CD3+ TC III",
"CD3+ TC IV",
"CD3+ TC V",
"CD3+ TC VI",
"FOXP3+ TC",
"CD34+ EC I",
"CD34+ EC II",
"ACTA2+ SMC",
"CD3+CD56+ NK I",
"CD3+CD56+ NK II",
# "CD68+KIT+ MC",
"CD79+ BCplasma",
"CD79A+ BCmem"))
| | 0 % ~calculating
|+ | 1 % ~02m 08s
|+ | 2 % ~02m 20s
|++ | 3 % ~02m 22s
|++ | 4 % ~02m 23s
|+++ | 5 % ~02m 24s
|+++ | 6 % ~02m 24s
|++++ | 7 % ~02m 20s
|++++ | 8 % ~02m 19s
|+++++ | 9 % ~02m 17s
|+++++ | 10% ~02m 18s
|++++++ | 11% ~02m 16s
|++++++ | 12% ~02m 15s
|+++++++ | 13% ~02m 13s
|+++++++ | 14% ~02m 12s
|++++++++ | 15% ~02m 11s
|++++++++ | 16% ~02m 10s
|+++++++++ | 17% ~02m 09s
|+++++++++ | 18% ~02m 07s
|++++++++++ | 19% ~02m 05s
|++++++++++ | 20% ~02m 03s
|+++++++++++ | 21% ~02m 01s
|+++++++++++ | 22% ~01m 59s
|++++++++++++ | 23% ~01m 57s
|++++++++++++ | 24% ~01m 56s
|+++++++++++++ | 25% ~01m 54s
|+++++++++++++ | 26% ~01m 53s
|++++++++++++++ | 27% ~01m 51s
|++++++++++++++ | 28% ~01m 49s
|+++++++++++++++ | 29% ~01m 47s
|+++++++++++++++ | 30% ~01m 45s
|++++++++++++++++ | 31% ~01m 43s
|++++++++++++++++ | 32% ~01m 42s
|+++++++++++++++++ | 33% ~01m 40s
|+++++++++++++++++ | 34% ~01m 38s
|++++++++++++++++++ | 35% ~01m 36s
|++++++++++++++++++ | 36% ~01m 34s
|+++++++++++++++++++ | 37% ~01m 33s
|+++++++++++++++++++ | 38% ~01m 31s
|++++++++++++++++++++ | 39% ~01m 29s
|++++++++++++++++++++ | 40% ~01m 28s
|+++++++++++++++++++++ | 41% ~01m 26s
|+++++++++++++++++++++ | 42% ~01m 25s
|++++++++++++++++++++++ | 43% ~01m 23s
|++++++++++++++++++++++ | 44% ~01m 21s
|+++++++++++++++++++++++ | 45% ~01m 20s
|+++++++++++++++++++++++ | 46% ~01m 18s
|++++++++++++++++++++++++ | 47% ~01m 17s
|++++++++++++++++++++++++ | 48% ~01m 15s
|+++++++++++++++++++++++++ | 49% ~01m 14s
|+++++++++++++++++++++++++ | 50% ~01m 12s
|++++++++++++++++++++++++++ | 51% ~01m 10s
|++++++++++++++++++++++++++ | 52% ~01m 09s
|+++++++++++++++++++++++++++ | 53% ~01m 07s
|+++++++++++++++++++++++++++ | 54% ~01m 06s
|++++++++++++++++++++++++++++ | 55% ~01m 04s
|++++++++++++++++++++++++++++ | 56% ~01m 03s
|+++++++++++++++++++++++++++++ | 57% ~01m 01s
|+++++++++++++++++++++++++++++ | 58% ~60s
|++++++++++++++++++++++++++++++ | 59% ~58s
|++++++++++++++++++++++++++++++ | 60% ~57s
|+++++++++++++++++++++++++++++++ | 61% ~55s
|+++++++++++++++++++++++++++++++ | 62% ~54s
|++++++++++++++++++++++++++++++++ | 63% ~52s
|++++++++++++++++++++++++++++++++ | 64% ~51s
|+++++++++++++++++++++++++++++++++ | 65% ~49s
|+++++++++++++++++++++++++++++++++ | 66% ~48s
|++++++++++++++++++++++++++++++++++ | 67% ~48s
|++++++++++++++++++++++++++++++++++ | 68% ~46s
|+++++++++++++++++++++++++++++++++++ | 69% ~45s
|+++++++++++++++++++++++++++++++++++ | 70% ~43s
|++++++++++++++++++++++++++++++++++++ | 71% ~42s
|++++++++++++++++++++++++++++++++++++ | 72% ~40s
|+++++++++++++++++++++++++++++++++++++ | 73% ~39s
|+++++++++++++++++++++++++++++++++++++ | 74% ~37s
|++++++++++++++++++++++++++++++++++++++ | 75% ~36s
|++++++++++++++++++++++++++++++++++++++ | 76% ~34s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~33s
|+++++++++++++++++++++++++++++++++++++++ | 78% ~31s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~30s
|++++++++++++++++++++++++++++++++++++++++ | 80% ~28s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~27s
|+++++++++++++++++++++++++++++++++++++++++ | 82% ~25s
|++++++++++++++++++++++++++++++++++++++++++ | 83% ~24s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~23s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~21s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~20s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~18s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~17s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~15s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~14s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~13s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~11s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~10s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~08s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~07s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~06s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=02m 17s
DT::datatable(MC.markers)MC_Volcano_TargetsA = EnhancedVolcano(MC.markers,
lab = rownames(MC.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "Mast cell markers\n(Mast cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/nrow(MC.markers), # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
MC_Volcano_TargetsAggsave(paste0(PLOT_loc, "/", Today, ".Volcano.MC.DEG.Targets.pdf"),
plot = MC_Volcano_TargetsA)Saving 18 x 12 in image
The target results are given below and written to a file.
library(tibble)
MC.markers <- add_column(MC.markers, Gene = row.names(MC.markers), .before = 1)
temp <- MC.markers[MC.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)fwrite(temp, file = paste0(OUT_loc, "/", Today, ".MC.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)Comparison between the natural killer cell communities (NCAM1+), and all other communities.
NK.markers <- FindMarkers(object = scRNAseqData,
ident.1 = c("CD3+CD56+ NK I",
"CD3+CD56+ NK II"),
ident.2 = c("CD68+CASP1+IL1B+SELL MInf",
"CD68+CD1C+ DC",
"CD68+CD4+ Mono",
"CD68+IL18+TLR4+TREM2+ MRes",
"CD68+ABCA1+OLR1+TREM2+ FC",
"CD3+ TC I",
"CD3+ TC II",
"CD3+ TC III",
"CD3+ TC IV",
"CD3+ TC V",
"CD3+ TC VI",
"FOXP3+ TC",
"CD34+ EC I",
"CD34+ EC II",
"ACTA2+ SMC",
# "CD3+CD56+ NK I",
# "CD3+CD56+ NK II",
"CD68+KIT+ MC",
"CD79+ BCplasma",
"CD79A+ BCmem"))
| | 0 % ~calculating
|+ | 1 % ~56s
|++ | 2 % ~56s
|++ | 3 % ~55s
|+++ | 4 % ~59s
|+++ | 5 % ~57s
|++++ | 6 % ~56s
|++++ | 7 % ~55s
|+++++ | 8 % ~54s
|+++++ | 9 % ~53s
|++++++ | 10% ~53s
|++++++ | 11% ~51s
|+++++++ | 12% ~51s
|+++++++ | 13% ~51s
|++++++++ | 14% ~50s
|++++++++ | 15% ~49s
|+++++++++ | 16% ~48s
|+++++++++ | 18% ~48s
|++++++++++ | 19% ~47s
|++++++++++ | 20% ~47s
|+++++++++++ | 21% ~46s
|+++++++++++ | 22% ~45s
|++++++++++++ | 23% ~45s
|++++++++++++ | 24% ~44s
|+++++++++++++ | 25% ~43s
|+++++++++++++ | 26% ~43s
|++++++++++++++ | 27% ~42s
|++++++++++++++ | 28% ~41s
|+++++++++++++++ | 29% ~41s
|+++++++++++++++ | 30% ~40s
|++++++++++++++++ | 31% ~40s
|++++++++++++++++ | 32% ~40s
|+++++++++++++++++ | 33% ~39s
|++++++++++++++++++ | 34% ~38s
|++++++++++++++++++ | 35% ~38s
|+++++++++++++++++++ | 36% ~37s
|+++++++++++++++++++ | 37% ~37s
|++++++++++++++++++++ | 38% ~36s
|++++++++++++++++++++ | 39% ~35s
|+++++++++++++++++++++ | 40% ~35s
|+++++++++++++++++++++ | 41% ~34s
|++++++++++++++++++++++ | 42% ~33s
|++++++++++++++++++++++ | 43% ~33s
|+++++++++++++++++++++++ | 44% ~32s
|+++++++++++++++++++++++ | 45% ~32s
|++++++++++++++++++++++++ | 46% ~31s
|++++++++++++++++++++++++ | 47% ~30s
|+++++++++++++++++++++++++ | 48% ~30s
|+++++++++++++++++++++++++ | 49% ~29s
|++++++++++++++++++++++++++ | 51% ~28s
|++++++++++++++++++++++++++ | 52% ~28s
|+++++++++++++++++++++++++++ | 53% ~27s
|+++++++++++++++++++++++++++ | 54% ~27s
|++++++++++++++++++++++++++++ | 55% ~26s
|++++++++++++++++++++++++++++ | 56% ~27s
|+++++++++++++++++++++++++++++ | 57% ~26s
|+++++++++++++++++++++++++++++ | 58% ~26s
|++++++++++++++++++++++++++++++ | 59% ~25s
|++++++++++++++++++++++++++++++ | 60% ~24s
|+++++++++++++++++++++++++++++++ | 61% ~24s
|+++++++++++++++++++++++++++++++ | 62% ~23s
|++++++++++++++++++++++++++++++++ | 63% ~22s
|++++++++++++++++++++++++++++++++ | 64% ~22s
|+++++++++++++++++++++++++++++++++ | 65% ~21s
|+++++++++++++++++++++++++++++++++ | 66% ~20s
|++++++++++++++++++++++++++++++++++ | 67% ~20s
|+++++++++++++++++++++++++++++++++++ | 68% ~19s
|+++++++++++++++++++++++++++++++++++ | 69% ~18s
|++++++++++++++++++++++++++++++++++++ | 70% ~18s
|++++++++++++++++++++++++++++++++++++ | 71% ~17s
|+++++++++++++++++++++++++++++++++++++ | 72% ~17s
|+++++++++++++++++++++++++++++++++++++ | 73% ~16s
|++++++++++++++++++++++++++++++++++++++ | 74% ~15s
|++++++++++++++++++++++++++++++++++++++ | 75% ~15s
|+++++++++++++++++++++++++++++++++++++++ | 76% ~14s
|+++++++++++++++++++++++++++++++++++++++ | 77% ~14s
|++++++++++++++++++++++++++++++++++++++++ | 78% ~13s
|++++++++++++++++++++++++++++++++++++++++ | 79% ~13s
|+++++++++++++++++++++++++++++++++++++++++ | 80% ~12s
|+++++++++++++++++++++++++++++++++++++++++ | 81% ~11s
|++++++++++++++++++++++++++++++++++++++++++ | 82% ~11s
|++++++++++++++++++++++++++++++++++++++++++ | 84% ~10s
|+++++++++++++++++++++++++++++++++++++++++++ | 85% ~09s
|+++++++++++++++++++++++++++++++++++++++++++ | 86% ~09s
|++++++++++++++++++++++++++++++++++++++++++++ | 87% ~08s
|++++++++++++++++++++++++++++++++++++++++++++ | 88% ~07s
|+++++++++++++++++++++++++++++++++++++++++++++ | 89% ~07s
|+++++++++++++++++++++++++++++++++++++++++++++ | 90% ~06s
|++++++++++++++++++++++++++++++++++++++++++++++ | 91% ~06s
|++++++++++++++++++++++++++++++++++++++++++++++ | 92% ~05s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 93% ~04s
|+++++++++++++++++++++++++++++++++++++++++++++++ | 94% ~04s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 95% ~03s
|++++++++++++++++++++++++++++++++++++++++++++++++ | 96% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 97% ~02s
|+++++++++++++++++++++++++++++++++++++++++++++++++ | 98% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 99% ~01s
|++++++++++++++++++++++++++++++++++++++++++++++++++| 100% elapsed=60s
DT::datatable(NK.markers)NK_Volcano_TargetsA = EnhancedVolcano(NK.markers,
lab = rownames(NK.markers),
x = "avg_log2FC",
y = "p_val_adj",
selectLab = target_genes_qc,
axisLabSize = 12,
xlab = "average fold-change",
title = "NK markers\n(NK-cell communities vs the rest)",
titleLabSize = 14,
pCutoff = 0.05/nrow(NK.markers), # 20552 genes
FCcutoff = 1.25,
pointSize = 1.5,
labSize = 3.0,
legendLabels =c('NS','avg. fold-change','P',
'P & avg. fold-change'),
legendPosition = "right",
legendLabSize = 10,
legendIconSize = 3.0,
drawConnectors = TRUE,
widthConnectors = 0.2,
colConnectors = "#595A5C",
gridlines.major = FALSE,
gridlines.minor = FALSE)
NK_Volcano_TargetsAggsave(paste0(PLOT_loc, "/", Today, ".Volcano.NK.DEG.Targets.pdf"),
plot = NK_Volcano_TargetsA)Saving 18 x 12 in image
The target results are given below and written to a file.
library(tibble)
NK.markers <- add_column(NK.markers, Gene = row.names(NK.markers), .before = 1)
temp <- NK.markers[NK.markers$Gene %in% target_genes_qc,]
DT::datatable(temp)fwrite(temp, file = paste0(OUT_loc, "/", Today, ".NK.DEG.Targets.txt"),
quote = FALSE,
sep = "\t",
showProgress = FALSE, verbose = FALSE)List of samples to be included based on informed consent (see above).
samples_of_interest <- unlist(scRNAseqDataMetaAE.all$Patient)scRNAseqDataCEA39 <- subset(scRNAseqData, subset = Patient %in% samples_of_interest)variables_of_interest <- c("Hospital", "ORyear", "Artery_summary",
"Age", "Gender",
"TC_final", "LDL_final", "HDL_final", "TG_final",
"systolic", "diastoli", "GFR_MDRD", "BMI",
"KDOQI", "BMI_WHO",
"SmokerStatus", "AlcoholUse",
"DiabetesStatus",
"Hypertension.selfreport", "Hypertension.selfreportdrug", "Hypertension.composite", "Hypertension.drugs",
"Med.anticoagulants", "Med.all.antiplatelet", "Med.Statin.LLD",
"Stroke_Dx",
"sympt", "Symptoms.5G", "AsymptSympt", "AsymptSympt2G",
"Symptoms.Update2G", "Symptoms.Update3G", "indexsymptoms_latest_4g",
"restenos", "stenose",
"CAD_history", "PAOD", "Peripheral.interv",
"EP_composite", "EP_composite_time", "EP_major", "EP_major_time")
temp <- subset(scRNAseqDataMetaAE.all, select = c("Patient", variables_of_interest))
# str(temp)scRNAseqDataCEA39@meta.data <- merge(scRNAseqDataCEA39@meta.data, temp, by.x = "Patient", by.y = "Patient")
scRNAseqDataCEA39@meta.data <- dplyr::rename(scRNAseqDataCEA39@meta.data, "STUDY_NUMBER" = "Patient")
# str(scRNAseqDataCEA39@meta.data)temp2 <- as_tibble(subset(scRNAseqDataCEA39@meta.data, select = c("STUDY_NUMBER", "orig.ident", "nCount_RNA", "nFeature_RNA",
"Plate", "Batch", "C.H", "Type", "percent.mt",
"nCount_SCT", "nFeature_SCT", "seurat_clusters")))
# fwrite(temp2,
# file = paste0(OUT_loc, "/", Today, ".AESCRNA.CEA.39pts.samplelist.after_qc.IC_commercial.csv"),
# sep = ",", row.names = FALSE, col.names = TRUE,
# showProgress = TRUE)
# rm(temp2)
#
# temp <- dplyr::rename(temp, "STUDY_NUMBER" = "Patient")
# fwrite(temp,
# file = paste0(OUT_loc, "/", Today, ".AESCRNA.CEA.39pts.clinicaldata.after_qc.IC_commercial.csv"),
# sep = ",", row.names = FALSE, col.names = TRUE,
# showProgress = TRUE)
# rm(temp)
#
# saveRDS(scRNAseqDataCEA39, file = paste0(OUT_loc, "/", Today, ".AESCRNA.CEA.39pts.Seurat.after_qc.IC_commercial.RDS"))
fwrite(temp2,
file = paste0(OUT_loc, "/", Today, ".AESCRNA.CEA.39pts.samplelist.after_qc.IC_academic.csv"),
sep = ",", row.names = FALSE, col.names = TRUE,
showProgress = TRUE)
rm(temp2)
temp <- dplyr::rename(temp, "STUDY_NUMBER" = "Patient")
fwrite(temp,
file = paste0(OUT_loc, "/", Today, ".AESCRNA.CEA.39pts.clinicaldata.after_qc.IC_academic.csv"),
sep = ",", row.names = FALSE, col.names = TRUE,
showProgress = TRUE)
rm(temp)
saveRDS(scRNAseqDataCEA39, file = paste0(OUT_loc, "/", Today, ".AESCRNA.CEA.39pts.Seurat.after_qc.IC_academic.RDS"))Version: v1.0.0
Last update: 2022-03-17
Written by: Sander W. van der Laan (s.w.vanderlaan-2[at]umcutrecht.nl).
Description: Script to load single-cell RNA sequencing (scRNAseq) data, and perform quality control (QC), and initial mapping to cells.
Minimum requirements: R version 3.5.2 (2018-12-20) -- 'Eggshell Igloo', macOS Mojave (10.14.2).
Change log
* v1.0.0 Initial version.
sessionInfo()R version 4.1.2 (2021-11-01)
Platform: x86_64-apple-darwin17.0 (64-bit)
Running under: macOS Monterey 12.2.1
Matrix products: default
LAPACK: /Library/Frameworks/R.framework/Versions/4.1/Resources/lib/libRlapack.dylib
locale:
[1] en_US.UTF-8/en_US.UTF-8/en_US.UTF-8/C/en_US.UTF-8/en_US.UTF-8
attached base packages:
[1] stats4 grid tools stats graphics grDevices datasets utils methods base
other attached packages:
[1] RColorBrewer_1.1-2 labelled_2.9.0 SeuratObject_4.0.4 Seurat_4.1.0 EnhancedVolcano_1.12.0 ggrepel_0.9.1
[7] mygene_1.30.0 GenomicFeatures_1.46.5 GenomicRanges_1.46.1 GenomeInfoDb_1.30.1 org.Hs.eg.db_3.14.0 AnnotationDbi_1.56.2
[13] IRanges_2.28.0 S4Vectors_0.32.3 Biobase_2.54.0 BiocGenerics_0.40.0 UpSetR_1.4.0 ggpubr_0.4.0
[19] forestplot_2.0.1 checkmate_2.0.0 magrittr_2.0.2 pheatmap_1.0.12 devtools_2.4.3 usethis_2.1.5
[25] BlandAltmanLeh_0.3.1 sjPlot_2.8.10 tableone_0.13.0 haven_2.4.3 openxlsx_4.2.5 eeptools_1.2.4
[31] DT_0.21 knitr_1.37 forcats_0.5.1 stringr_1.4.0 purrr_0.3.4 tibble_3.1.6
[37] ggplot2_3.3.5 tidyverse_1.3.1 data.table_1.14.2 naniar_0.6.1 tidyr_1.2.0 dplyr_1.0.8
[43] optparse_1.7.1 readr_2.1.2 pander_0.6.4 rmarkdown_2.13 worcs_0.1.9.1
loaded via a namespace (and not attached):
[1] vcd_1.4-9 Hmisc_4.6-0 ica_1.0-2 class_7.3-20 ps_1.6.0
[6] Rsamtools_2.10.0 lmtest_0.9-39 rprojroot_2.0.2 crayon_1.5.0 spatstat.core_2.4-0
[11] MASS_7.3-55 nlme_3.1-155 backports_1.4.1 reprex_2.0.1 rlang_1.0.2
[16] XVector_0.34.0 ROCR_1.0-11 readxl_1.3.1 performance_0.8.0 irlba_2.3.5
[21] extrafontdb_1.0 nloptr_2.0.0 callr_3.7.0 filelock_1.0.2 proto_1.0.0
[26] extrafont_0.17 BiocParallel_1.28.3 rjson_0.2.21 bit64_4.0.5 glue_1.6.2
[31] sctransform_0.3.3 vipor_0.4.5 parallel_4.1.2 processx_3.5.2 spatstat.sparse_2.1-0
[36] spatstat.geom_2.3-2 tidyselect_1.1.2 SummarizedExperiment_1.24.0 fitdistrplus_1.1-8 XML_3.99-0.9
[41] zoo_1.8-9 proj4_1.0-11 sjmisc_2.8.9 GenomicAlignments_1.30.0 chron_2.3-56
[46] xtable_1.8-4 evaluate_0.15 cli_3.2.0 zlibbioc_1.40.0 rstudioapi_0.13
[51] miniUI_0.1.1.1 sp_1.4-6 bslib_0.3.1 rpart_4.1.16 sjlabelled_1.1.8
[56] ensembldb_2.18.3 maps_3.4.0 shiny_1.7.1 xfun_0.30 askpass_1.1
[61] parameters_0.17.0 pkgbuild_1.3.1 cluster_2.1.2 KEGGREST_1.34.0 listenv_0.8.0
[66] Biostrings_2.62.0 png_0.1-7 future_1.24.0 withr_2.5.0 bitops_1.0-7
[71] ranger_0.13.1 plyr_1.8.6 cellranger_1.1.0 sys_3.4 AnnotationFilter_1.18.0
[76] e1071_1.7-9 survey_4.1-1 coda_0.19-4 pillar_1.7.0 cachem_1.0.6
[81] fs_1.5.2 vctrs_0.3.8 ellipsis_0.3.2 generics_0.1.2 gsubfn_0.7
[86] foreign_0.8-82 beeswarm_0.4.0 munsell_0.5.0 proxy_0.4-26 emmeans_1.7.2
[91] DelayedArray_0.20.0 fastmap_1.1.0 compiler_4.1.2 pkgload_1.2.4 abind_1.4-5
[96] httpuv_1.6.5 rtracklayer_1.54.0 sessioninfo_1.2.2 plotly_4.10.0 GenomeInfoDbData_1.2.7
[101] gridExtra_2.3 gert_1.5.0 lattice_0.20-45 deldir_1.0-6 utf8_1.2.2
[106] later_1.3.0 BiocFileCache_2.2.1 jsonlite_1.8.0 arm_1.12-2 credentials_1.3.2
[111] scales_1.1.1 pbapply_1.5-0 carData_3.0-5 estimability_1.3 renv_0.15.4
[116] lazyeval_0.2.2 promises_1.2.0.1 car_3.0-12 latticeExtra_0.6-29 goftest_1.2-3
[121] spatstat.utils_2.3-0 reticulate_1.24 effectsize_0.6.0.1 ash_1.0-15 cowplot_1.1.1
[126] textshaping_0.3.6 Rtsne_0.15 uwot_0.1.11 igraph_1.2.11 survival_3.3-1
[131] yaml_2.3.5 systemfonts_1.0.4 htmltools_0.5.2 memoise_2.0.1 BiocIO_1.4.0
[136] viridisLite_0.4.0 digest_0.6.29 assertthat_0.2.1 mime_0.12 rappdirs_0.3.3
[141] Rttf2pt1_1.3.10 bayestestR_0.11.5 RSQLite_2.2.10 sqldf_0.4-11 future.apply_1.8.1
[146] remotes_2.4.2 blob_1.2.2 ragg_1.2.2 labeling_0.4.2 Formula_1.2-4
[151] splines_4.1.2 Cairo_1.5-15 ProtGenerics_1.26.0 RCurl_1.98-1.6 broom_0.7.12
[156] hms_1.1.1 modelr_0.1.8 base64enc_0.1-3 colorspace_2.0-3 BiocManager_1.30.16
[161] ggbeeswarm_0.6.0 ggrastr_1.0.1 nnet_7.3-17 sass_0.4.0 Rcpp_1.0.8.3
[166] RANN_2.6.1 mvtnorm_1.1-3 fansi_1.0.2 tzdb_0.2.0 brio_1.1.3
[171] parallelly_1.30.0 R6_2.5.1 ggridges_0.5.3 lifecycle_1.0.1 zip_2.2.0
[176] datawizard_0.3.0 curl_4.3.2 ggsignif_0.6.3 minqa_1.2.4 jquerylib_0.1.4
[181] leiden_0.3.9 testthat_3.1.2 getopt_1.20.3 rticles_0.23 Matrix_1.4-0
[186] prereg_0.6.0 desc_1.4.1 RcppAnnoy_0.0.19 htmlwidgets_1.5.4 polyclip_1.10-0
[191] biomaRt_2.50.3 crosstalk_1.2.0 rvest_1.0.2 mgcv_1.8-39 globals_0.14.0
[196] openssl_2.0.0 insight_0.16.0 htmlTable_2.4.0 patchwork_1.1.0.9000 spatstat.random_2.1-0
[201] codetools_0.2-18 matrixStats_0.61.0 lubridate_1.8.0 prettyunits_1.1.1 dbplyr_2.1.1
[206] gtable_0.3.0 DBI_1.1.2 visdat_0.5.3 tensor_1.5 httr_1.4.2
[211] KernSmooth_2.23-20 stringi_1.7.6 progress_1.2.2 farver_2.1.0 reshape2_1.4.4
[216] xml2_1.3.3 boot_1.3-28 ggeffects_1.1.1 ggalt_0.4.0 lme4_1.1-28
[221] restfulr_0.0.13 scattermore_0.8 bit_4.0.4 jpeg_0.1-9 sjstats_0.18.1
[226] MatrixGenerics_1.6.0 spatstat.data_2.1-2 pkgconfig_2.0.3 maptools_1.1-3 rstatix_0.7.0
[231] mitools_2.4
rm(backup.scRNAseqData)Warning in rm(backup.scRNAseqData) :
object 'backup.scRNAseqData' not found
rm(scRNAseqData, scRNAseqDataCEA39)
save.image(paste0(PROJECT_loc, "/",Today,".",PROJECTNAME,".AESCRNA.results.RData"))| © 1979-2022 Sander W. van der Laan | s.w.vanderlaan[at]gmail.com swvanderlaan.github.io. |